<!DOCTYPE HTML>
<html class="center-html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>就诊人列表</title>
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body class="center-body">
    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>

    <div class="user-container">
      <div class="user-wrapper">
        <div class="user-title">
          <h4>就诊人(最多4人)</h4>
        </div>

        <div class="user-list">
            <div id="my_div_1">

            </div>
          <div class="user-add">
            <a href="add.html">+ 添加就诊人</a>
          </div>
        </div>
      </div>
    </div>


</body>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script>
  var openid = localStorage.getItem("openid");
  $.ajax({
      type: "post",
      url: "http://guowang.nat300.top/wechat114/thepatients/selectByopenid",
      data:{"openid":openid},
      async:false,
      dataType: "json",
      success: function (data) {
          var str = "";
          for (var i=0;i<data.data.length;i++){
              str += "<div class=\"user-item\">\n" +
                  "            <div class=\"user-info\">\n" +
                  "              <h4>"+data.data[i].thepatientname+"</h4>\n" +
              "              <p>居民身份证: "+data.data[i].idnum+"</p>\n" +
              "            </div>\n" +
              "            <div class=\"user-link\">\n" +
              "              <p>查看详情</p>\n" +
              "              <i class=\"aui-iconfont aui-icon-right\"></i>\n" +
              "            </div>\n" +
              "          </div>";
          }
          $("#my_div_1").html(str)
      }
  })
</script>
</html>
